﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucAccountInfo.ascx.cs"
    Inherits="UserControl_ucAccountInfo" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<script type="text/javascript">
    function UpdateParentsLogin(UserName) {
        if (window.parent.SetLoggedIn != null)
            window.parent.SetLoggedIn();
        if (window.parent.tb_remove != null)
            window.parent.tb_remove();
        if (window.parent.Checkout != null)
            window.parent.Checkout();
        if (window.parent.SetHello != null) {
            window.parent.SetHello(UserName);
        }
    }
</script>

<table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
        <td class="clsRegisterTitle">
            Account Information
        </td>
    </tr>
    <tr>
        <td style="padding: 5px 7px 5px 7px; text-align: left;">
            <table border="0" cellpadding="0" cellspacing="3">
                <tr>
                    <td align="right" style="width: 200px">
                        Email Address:
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtEmail" runat="server" CssClass="txtRegisterReq" Enabled="false" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        First Name:
                    </td>
                    <td>
                        <asp:TextBox ID="txtFName" runat="server" ValidationGroup="validRegister" CssClass="txtRegisterReq" Width="200px"></asp:TextBox>
                        &nbsp;<asp:RequiredFieldValidator ID="requireFirstName" ControlToValidate="txtFName"
                            runat="server" ErrorMessage="*" Display="Dynamic" ValidationGroup="grpRegister"></asp:RequiredFieldValidator></td>
                </tr>
                <tr>
                    <td align="right" style="width: 200px;">
                        Last Name:
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtSName" runat="server" ValidationGroup="validRegister" CssClass="txtRegisterReq" Width="200px"></asp:TextBox>
                        &nbsp;<asp:RequiredFieldValidator ID="requireLastName" ControlToValidate="txtSName"
                            runat="server" ErrorMessage="*" Display="Dynamic" ValidationGroup="grpRegister"></asp:RequiredFieldValidator></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td class="clsRegisterTitle">
            Shipping Address
        </td>
    </tr>
    <tr>
        <td style="padding: 5px 7px 5px 7px; text-align: left;">
            <table border="0" cellpadding="0" cellspacing="3">
                <tr>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 200px">
                        Name or Bussiness Name:
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtName" runat="server" CssClass="txtRegisterReq" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Address:
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtAddress" runat="server" CssClass="txtRegisterReq" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        City or Town Name:
                    </td>
                    <td align="left" >
                        <asp:DropDownList ID="cbcity" runat="server" Width="170px">
                            <asp:ListItem Value="0">Tp Ho Chi Minh</asp:ListItem>
                            <asp:ListItem Value="1">Ha Noi</asp:ListItem>
                            <asp:ListItem Value="2">Can Tho</asp:ListItem>
                            <asp:ListItem Value="3">Nha Trang</asp:ListItem>
                            <asp:ListItem Value="4">Lam Dong</asp:ListItem>
                            <asp:ListItem Value="5">Quang Ngai</asp:ListItem>
                            <asp:ListItem Value="6">Phan Thiet</asp:ListItem>
                            <asp:ListItem Value="7">Binh Thuan</asp:ListItem>
                            <asp:ListItem Value="8">Dong Nai</asp:ListItem>
                            <asp:ListItem Value="9">Phu Yen</asp:ListItem>
                            <asp:ListItem Value="10">Khanh Hoa</asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        Country:
                    </td>
                    <td align="left">
                        <%--<asp:TextBox ID="txtCountry" runat="server" CssClass="txtRegisterReq"></asp:TextBox>--%><asp:TextBox
                            ID="txtCountry" runat="server" ValidationGroup="validRegister" CssClass="txtRegisterReq"
                            Enabled="False" Text="VietNam" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td style="text-align: right">
                        Phone Number:
                    </td>
                    <td align="left">
                        <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers"
                            TargetControlID="txtPhone">
                        </asp:FilteredTextBoxExtender>
                        <asp:TextBox ID="txtPhone" runat="server" CssClass="txtRegisterReq" MaxLength="10" Width="200px"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Less than 12 characters"
                            ControlToValidate="txtPhone" ValidationExpression="(^[0]\d{9}$)|(^[0]\d{9}$)"
                            ValidationGroup="grpRegister" Style="font-size: small"></asp:RegularExpressionValidator>
                        <br />
                    </td>
                </tr>
</table>
</td> </tr>
<tr>
    <td colspan="2">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </td>
</tr>
<tr>
    <td align="center" style="padding-top: 10px;">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <asp:Button ID="btnSubmit" runat="server" SkinID="btnSubmit" Text="Save" ValidationGroup="grpRegister"
                    OnClick="btnSubmit_Click" />
                    
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </td>
</tr>
<tr>
    <td align="center" style="padding-top: 5px;">
        <asp:UpdateProgress ID="updatePrgReg" runat="server">
            <ProgressTemplate>
                <asp:Image ID="imgLoading" runat="server" ToolTip="Loading..." ImageUrl="~/Client/images/loadingAnimation.gif"
                    Style="border-width: 0px;" />
            </ProgressTemplate>
        </asp:UpdateProgress>
    </td>
</tr>
</table> 